<?php
$this->load("header");
$this->navbar();
?>
  <link href = '<?php echo CSS_PATH."manage_users/style_table_1.css";?>' rel="stylesheet" >
      <link href = '<?php echo CSS_PATH."manage_users/responsive_table.css";?>' rel="stylesheet" >
<form action="" method="POST">
    <div id="page-wrap" class="cover">
        <!-- Single button -->
       <div class="group_select_desk" style="width: 90%;">
 <div style="width:30%;float:left"><h4 style="color:blue;margin-left:10px">USERS</h4></div>
 <div style="width:70%;display:block;float:left">
            <?php if (($_SESSION['Del'] == "Yes") or ($_SESSION['admin'] == 1)) { ?>  <div class="btn-group" style="float: right;">
                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        select <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="javascript:allCheck('chkDel[]',true)">Select All</a></li>
                        <li><a href="javascript:allCheck('chkDel[]',false)">Select None</a></li> 
                        <li><a href="javascript:reserveCheck('chkDel[]')" >Invert Select</a></li>
                    </ul>
                </div>
                <?php
            }
            if (($_SESSION['Del'] == "Yes") or ($_SESSION['admin'] == 1)) {
                ?>
                <div class="btn-group" style="margin-right: 10px;float: right">
                    <button type="submit" class="btn btn-default" style="width:80px">
                        Delete 
                    </button>
                </div> 
                <?php
            }
        
            if (($_SESSION['Addd'] == "Yes") or ($_SESSION['admin'] == 1)) {
                ?>
              <div class="btn-group" style="margin-right: 10px;float: right">
                    <a href = "?add=1" >
                        <button type="button" class="btn btn-default"  style="width:80px">
                            Add 
                        </button></a> </div>
    <?php
}
?>
</div>
        </div>
        <div class="group_select_mob">
        <span><h4 style="color:blue;margin-left:10px">USERS</h4></span><br>

<?php
if (($_SESSION['Del'] == "Yes") or ($_SESSION['admin'] == 1)) {
    ?>  <div class="btn-group" style="float: left;">
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" >
                    Select&nbsp;
                    <span class="caret"></span>
                </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="javascript:allCheck('chkDel[]',true)">Select All</a></li>
                        <li><a href="javascript:allCheck('chkDel[]',false)">Select None</a></li> 
                        <li><a href="javascript:reserveCheck('chkDel[]')" >Invert Select</a></li>
                    </ul>
                </div>
    <?php
}
?>

            <div class="btn-group"  style="float: right">
                <a class="btn dropdown-toggle" data-toggle="dropdown" href="#" >
                    Action&nbsp;
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu"  style="float:left;margin-left: -84px">
                    <!-- dropdown menu links -->
                    <?php 
                   if (($_SESSION['Addd'] == "Yes") or ($_SESSION['admin'] == 1)) {
                ?>
                   <li><a href="add_customer"><i class="icon-file"></i>New</a></li><?php } ?>
                    <li><a href=""><i class="icon-print"></i>Print</a></li> 
                    <li><a href="" ><i class="icon-list"></i>Report</a></li> 
<?php
if (($_SESSION['Del'] == "Yes") or ($_SESSION['admin'] == 1)) {
    ?>
                        <li><button type="submit" style="border:none;background:none;margin-left: 20px">Delete</button></li>
                        <?php
                    }
                    ?>
                    <li><a href="" ><i class="icon-list-alt"></i>VAT Report</a></li> 
                    <li><a href="" ><i class="icon-th"></i>Options</a></li> 
                </ul>
            </div>
        </div><br><br>
        <table  class="table1" id="table_pro">
            <thead  class="thead1">
                <tr>
                 <!--   <th>&nbsp;</th>-->
                    <th>School Name</th>
                    <th>Register Name</th>
                    <th>Academic Year</th>
                    <th>Active</th>
                </tr>
            </thead>
            <tbody>
<?php
foreach ($this->users_display as $key => $value) {
    ?>
                    <tr>
                      <!--  <td><input type="checkbox" name="chkDel[]" id="chkDel<?= $i; ?>" value="<?php echo $value['userid']; ?>"></td>-->
                        <td style="overflow-wrap: break-word">
                            <?php
                                if (($_SESSION['Edit'] == "Yes") or ($_SESSION['admin'] == 1)) {

                                    echo '<a href=?details=' . $value['userid'] . '>' . $value['email'] . '</a>';
                                } else {
                                    echo $value['email'];
                                }
                                ?>
                        </td>
                        <td><?php echo $value['schoolname']; ?></td>
                        <td><?php echo $value['mobile']; ?></td>
                        <td><?php echo $value['status']; ?></td>
                    </tr>
<?php } ?>

            </tbody>
        </table>

    </div>
</form>
<?php
$this->load("footer");
?>